#include "SMPPUserMessageReference.hpp"

using namespace smpp::pdu;

UserMessageReference::UserMessageReference(const quint16 nValue):
TLV(TLVtags::TAG_USER_MESSAGE_REFERENCE,2),_Value(nValue){}

UserMessageReference::UserMessageReference(
const UserMessageReference &nUserMessageReference):
TLV(nUserMessageReference),_Value(nUserMessageReference.getValue()){}

bool UserMessageReference::operator ==(
	const UserMessageReference &nUserMessageReference) const{
	return (TLV::operator == (nUserMessageReference) && 
			_Value == nUserMessageReference.getValue());
}

bool UserMessageReference::operator !=(
	const UserMessageReference &nUserMessageReference) const{
	return !this->operator == (nUserMessageReference);
}

UserMessageReference &UserMessageReference::operator = (
	const UserMessageReference &nUserMessageReference){
	if(*this == nUserMessageReference)
		return *this;
	TLV::operator = (nUserMessageReference);
	_Value = nUserMessageReference.getValue();
	return *this;
}

void UserMessageReference::setValue(const quint16 nValue){
	_Value = nValue;
}

const quint16 UserMessageReference::getValue() const{
	return _Value;
}
